<?php

class UsersModule extends CWebModule
{
	public $recoveryUrl = array("/Users/recovery");
	public function init()
	{
		// this method is called when the module is being created
		// you may place code here to customize the module or the application

		// import the module-level models and components
		$this->setImport(array(
			'Users.models.*',
			'Users.components.*',
		));
	}

	public function beforeControllerAction($controller, $action)
	{
		if(parent::beforeControllerAction($controller, $action))
		{
			// this method is called before any module controller action is performed
			// you may place customized code here
			return true;
		}
		else
			return false;
	}
	public static function t($str='',$params=array()) {
		// TODO: Replace user to user.user by support yii 
		return Yii::t("users", $str, $params);
	}
	public static function sendMail($email,$subject,$message) {
    	Yii::app()->mailer->sendEmail($subject,$message,Yii::app()->params['adminEmail'],'webAdmin',array(array('email'=>$email,'name'=>$email)));	
	}
	/**
	 * @return hash string.
	 */
}
